home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 9 / FM Towns Free Software Collection 9.iso / t_os / shell / tsbgex / src / win / init.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-16  |  745 b   |  45 lines

  1. #include "win.h"
  2.  
  3. extern struct list head, tail;
  4.  
  5. init()
  6. {
  7.     head.next = (struct window *)&tail;
  8.     tail.prev = (struct window *)&head;
  9.     return (0);
  10. }
  11.  
  12. create(w)
  13. struct window *w;
  14. {
  15.     w->next = (struct window *)&tail;
  16.     w->prev = tail.prev;
  17.     tail.prev->next = w;
  18.     tail.prev = w;
  19.     w->mapped = FALSE;
  20.     w->notify = (void (*)())0;
  21.     w->notifyMask = 0;
  22.     return (0);
  23. }
  24.  
  25. delete(w)
  26. struct window *w;
  27. {
  28.     w->prev->next = w->next;
  29.     w->next->prev = w->prev;
  30.     return (0);
  31. }
  32.  
  33. lower(struct window *w)
  34. {
  35.     if (w->prev == (struct window *)&head)
  36.         return (0);
  37.     w->prev->next = w->next;
  38.     w->next->prev = w->prev;
  39.     w->next = head.next;
  40.     w->next->prev = w;
  41.     w->prev = (struct window *)&head;
  42.     w->prev->next = w;
  43.     return (0);
  44. }    
  45.